﻿using CKS2320.Common;
using CKS2320.Common.Model;
using CKS2320.Domain.DBEntity;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CKS2320.Repository.Interface
{
    public interface ICksLargeTotalRepository
    {
        int GetAllCount(string Starttime, string Endtime, bool f);
        List<DefectiveDto> GetdefectiveList(string Starttime, string Endtime);
        List<AllStationCodeDto> GetTotalCount1(string Starttime, string Endtime, int r);
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        DataQueryResponse QueryListCount();
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        List<Detectiondetail> QueryList(TotalReq req, PLCRunTypeEnum pLCRunTypeEnum);
        /// <summary>
        /// 导出查询
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        List<ExportQueryListModel> ExportQueryList(PLCRunTypeEnum pLCRunTypeEnum);
        List<DataQueryListModel> QueryListDetail(List<Detectiondetail> detailList, IEnumerable<Indicatortolerancezone> indicatorToleranceZonesList, PLCRunTypeEnum PLCRunType);
        /// <summary>
        /// 指标 公差带
        /// </summary>
        /// <returns></returns>
        IEnumerable<Indicatortolerancezone> GetIndicatorToleranceZones();
        /// <summary>
        /// 历史数据趋势
        /// </summary>
        /// <param name="req"></param>
        IEnumerable<Detectiondetail> HistoryDataTrends(string data, int detectedIndex);
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        OPResult QueryByPartCodeList(string partCode);

        Hashtable GetToDoMesData();


        Task<List<ExportQueryModel>> ExportQueryListNew(TotalReq totalReq);
        Task<List<ExportQueryCount>> ExportQueryListCount(TotalReq totalReq);
        Task<List<PerformanceRecord>> ExportRecord(TotalReq totalReq);
        Task<List<Equipmentfailurehistory>> ExportAlarm(TotalReq totalReq);
        Hashtable ExportQuerydetails(TotalReq req);
        List<Detectiondetail> GetThicknessList(TotalReq totalReq);

        Task<DataQueryResponseNew> QueryListCountNew(TotalReq totalReq);

                /// <summary>
        /// 历史数据趋势
        /// </summary>
        /// <param name="req"></param>
        IEnumerable<Op10coredata> HistoryDataTrendsBow(string data, int detectedIndex);
        /// <summary>
        /// 历史数据趋势
        /// </summary>
        /// <param name="req"></param>
        IEnumerable<Op30coredata> HistoryDataTrendsCamOrTl(string data, int detectedIndex);
        /// <summary>
        /// 历史数据趋势
        /// </summary>
        /// <param name="req"></param>
        IEnumerable<Op20coredata> HistoryDataTrendsTl(string data, int detectedIndex);
    }
}
